package com.itcoon.cloud.framework.webmvc.registry;/**
 * @author Athric Yu
 * 2024/11/25
 **/

import com.fasterxml.jackson.databind.JsonSerializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.HashMap;
import java.util.Map;

/**
 *
 *
 * @author Athric Yu
 * 2024/11/25
 **/
public class DefaultJacksonSerializersRegistry implements JacksonSerializersRegistry{

    private static final Logger log = LoggerFactory.getLogger(DefaultJacksonSerializersRegistry.class);

    private static final Map<Class<?>, JsonSerializer<?>> SERIALIZER_MAP = new HashMap<>();

    @Override
    public void register(Class<?> javaType, JsonSerializer<?> serializer) {
        SERIALIZER_MAP.put(javaType, serializer);
    }

    public Map<Class<?>, JsonSerializer<?>> getSerializerMap(){
        return SERIALIZER_MAP;
    }


}
